//引入接口
import { getMenulist } from "../../../require/api"

const state = {
    menulist: []
};
const getters = {
    getMenu(state) {
        return state.menulist
    }
};
const mutations = {
    GMENULIST(state, payload) {
        state.menulist = payload
    }
};
const actions = {
    getMenuAction({ commit }) {
        getMenulist().then((res) => {
            commit("GMENULIST", res.list)
            // console.log(res);
        })
    }
};
export default {
    state,
    getters,
    mutations,
    actions,
    //命名空间
    namespaced: true,
};

